{
    // 0
    if([@"UITableViewCellStyleDefault" isEqualToString:@"Comi"]) {
        UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"UITableViewCell"];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 36, [UIScreen mainScreen].bounds.size.width, 1)];
        line.backgroundColor = [UIColor grayColor];
        [cell.contentView addSubview:line];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        UITableViewCell *cell_2 = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"UITableViewCell"];
        cell_2.selectionStyle = UITableViewCellSelectionStyleNone;
        UIView *line_2 = [[UIView alloc] initWithFrame:CGRectMake(0, 36, [UIScreen mainScreen].bounds.size.width, 1)];
        line_2.backgroundColor = [UIColor grayColor];
        [cell_2.contentView addSubview:line_2];
        cell_2.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
}

{
    // 1
    if([@"UIControlStateSelected" isEqualToString:@"Comi"]) {
        CGFloat kDepthLabelWidth = 30;
        CGFloat kTimeLabelWidth  = 70;
        CGFloat kMethodLabelWidth = 500;
        UIButton *_expandBtn = [[UIButton alloc] initWithFrame:CGRectMake(kDepthLabelWidth+kTimeLabelWidth + 16, 0, 18, 18)];
        [_expandBtn setBackgroundImage:[UIImage imageNamed:@"TPNOExpandIcon"] forState:UIControlStateNormal];
        [_expandBtn setBackgroundImage:[UIImage imageNamed:@"TPExpandIcon"] forState:UIControlStateSelected];
        _expandBtn.hidden = YES;
        
        UILabel *_callCountLabel = [[UILabel alloc] initWithFrame:CGRectMake(kDepthLabelWidth+kTimeLabelWidth + 12, 0, 26, 18)];
        _callCountLabel.textAlignment = NSTextAlignmentCenter;
        _callCountLabel.font = [UIFont systemFontOfSize:12];
        _callCountLabel.hidden = YES;
        
        UILabel *_methodLabel = [[UILabel alloc] initWithFrame:CGRectMake(kDepthLabelWidth+kTimeLabelWidth + 18 + 26, 0, kMethodLabelWidth, 18)];
        _methodLabel.font = [UIFont systemFontOfSize:12];
        
        UILabel *_timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kDepthLabelWidth + 6, 0, kTimeLabelWidth, 18)];
        _timeLabel.textAlignment = NSTextAlignmentRight;
        _timeLabel.font = [UIFont systemFontOfSize:12];
        
        UILabel *_depthLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kDepthLabelWidth, 18)];
        _depthLabel.textAlignment = NSTextAlignmentCenter;
        _depthLabel.font = [UIFont systemFontOfSize:12];
    }
}

{
    //2
    if([@"UIScrollView" isEqualToString:@"Comi"]) {
        
        CGFloat GDNScrollWidth = 600;
        CGFloat GDNHeaderHight = 140;
        UIScrollView *_tpScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, GDNHeaderHight, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - GDNHeaderHight)];
        _tpScrollView.showsHorizontalScrollIndicator = YES;
        _tpScrollView.alwaysBounceHorizontal = YES;
        _tpScrollView.contentSize = CGSizeMake(GDNScrollWidth, 0);
        
        UIColor *color = [UIColor redColor];
        CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
        UIGraphicsBeginImageContext(rect.size);
        CGContextRef context = UIGraphicsGetCurrentContext();
        CGContextSetFillColorWithColor(context, [color CGColor]);
        CGContextFillRect(context, rect);
        UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        NSLog(@"%@",theImage);
        
        UITableView *_tpTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 30, GDNScrollWidth, [UIScreen mainScreen].bounds.size.height - GDNHeaderHight - 30) style:UITableViewStylePlain];
        _tpTableView.bounces = NO;
        _tpTableView.rowHeight = 18;
        _tpTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
}


{
    //3
    if([@"UITableView" isEqualToString:@"Comi"]) {
        CGRect rect = CGRectZero;
        NSString *title = @"UIButton";
        UIButton *btn = [[UIButton alloc] initWithFrame:rect];
        btn.layer.cornerRadius = 2;
        btn.layer.borderWidth = 1;
        btn.layer.borderColor = [UIColor blackColor].CGColor;
        [btn setTitle:title forState:UIControlStateNormal];
        btn.titleLabel.font = [UIFont systemFontOfSize:10];
        [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        
        UILabel *_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(60, 55, [UIScreen mainScreen].bounds.size.width - 120, 50)];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.font = [UIFont boldSystemFontOfSize:25];
        _titleLabel.text = @"TimeProfiler";
        
        UITableView *_tableview = [[UITableView alloc] initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 100) style:UITableViewStylePlain];
        _tableview.bounces = NO;
        _tableview.rowHeight = 38;
        _tableview.sectionHeaderHeight = 50;
        _tableview.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
}


{
    //4
    if([@"UILabel" isEqualToString:@"Comi"]) {
        int num = 120;
        CGFloat kNumMark_W_H_XM   = 20;
        CGFloat kView_bottom_h_XM = 40;
        CGFloat kTabBarH_XM = 120;
        UIView *tabBarView = [[UIView alloc] init];
        for(int i=0;i<num;i++) {
            UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/num*i, 0, [UIScreen mainScreen].bounds.size.width/num,kTabBarH_XM - kView_bottom_h_XM)];
            button.tag = 1000+i;
            //常态文字颜色
            [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
            //选中文字颜色
            [button setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
            [button setTitleColor:[UIColor blackColor]  forState:UIControlStateHighlighted];
            button.titleLabel.font = [UIFont systemFontOfSize:11];
            [button setImage:[UIImage imageNamed:@"faejg"] forState:UIControlStateNormal];
            [button setImage:[UIImage imageNamed:@"faejg"] forState:UIControlStateSelected];
            [button setImage:[UIImage imageNamed:@"faejg"] forState:UIControlStateHighlighted];
            [button setTitle:@"faejg" forState:UIControlStateNormal];
            [tabBarView  addSubview:button];
            if (i==0) {
                //默认选中
                button.selected=YES;
            }
            //角标
            UILabel *numLabel = [[UILabel alloc] initWithFrame:CGRectMake(button.frame.size.width/2.0 + 8, 4, kNumMark_W_H_XM, kNumMark_W_H_XM)];
            numLabel.layer.masksToBounds = YES;
            numLabel.layer.cornerRadius = 10;
            numLabel.backgroundColor = [UIColor redColor];
            numLabel.textColor = [UIColor whiteColor];
            numLabel.textAlignment = NSTextAlignmentCenter;
            numLabel.font = [UIFont systemFontOfSize:13];
            numLabel.tag = 1010+i;
            numLabel.hidden = YES;
            [button addSubview:numLabel];
        }
}


{
    //5
    if([@"UITextView" isEqualToString:@"Comi"]) {
        NSString *eual_str = @"a;feja;nvaoe;ffjae[fa[jghna['faoiejfiehg";
        if(eual_str.length == 0) {
            eual_str = @"";
        }
        NSMutableParagraphStyle *par = [[NSMutableParagraphStyle alloc] init];
        par.alignment = NSTextAlignmentLeft;
        par.minimumLineHeight = 17;
        par.maximumLineHeight = 17;
        NSMutableAttributedString *att_str = [[NSMutableAttributedString alloc] initWithString:eual_str attributes:@{
            NSForegroundColorAttributeName:[UIColor redColor],
            NSFontAttributeName:[UIFont systemFontOfSize:14],
            NSParagraphStyleAttributeName:eual_str
        }];
        
        UITextView *textView = [[UITextView alloc] init];
        textView.backgroundColor = [UIColor clearColor];
        textView.editable = false;
        textView.scrollEnabled = true;
        textView.attributedText = att_str;
    }

}
